<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>自建页面</title>
    <link rel="shortcut icon" th:href="@{/img/favicon.ico}"/>
    <link th:href="@{//cdn.bootcss.com/highlight.js/9.9.0/styles/xcode.min.css}" rel="stylesheet"/>
    <link th:href="@{/source/pinghsu/source/style.min.css}" rel="stylesheet"/>
    <script th:src="@{//cdn.bootcss.com/jquery/2.2.3/jquery.min.js}"></script>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
    <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<!--[if lt IE 8]>
<div class="browsehappy" role="dialog">
    当前网页 <strong>不支持</strong> 你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/" target="_blank">升级你的浏览器</a>。
</div>
<![endif]-->
<header id="header" class="header bg-white">
    <div class="navbar-container">
        <a  class="navbar-logo" href="/admin/index">
            <img th:src="@{/img/transparent.png}"/>
        </a>
        <div class="navbar-menu" th:each="menu : ${menus}">
            <a th:href="${menu.getMenuUrl()}" th:text="${menu.getMenuName()}" th:target="${menu.getMenuTarget()}"></a>
        </div>
        <div class="navbar-search" onclick="">
            <span class="icon-search"></span>
            <form role="search" onsubmit="return false;">
                <span class="search-box">
                    <input type="text" id="search-inp" class="input" placeholder="搜索..." maxlength="30"
                           autocomplete="off"/>
                </span>
            </form>
        </div>
        <div class="navbar-mobile-menu" onclick="">
            <span class="icon-menu cross"><span class="middle"></span></span>
            <ul>
                <li th:each="menu : ${menus}">
                    <a th:href="${menu.getMenuUrl()}" th:text="${menu.getMenuName()}" th:target="${menu.getMenuTarget()}"></a>
                </li>
            </ul>
        </div>
    </div>
</header>

<article class="main-content page-page" >
    <div class="post-header">
        <h1 class="post-title" itemprop="name headline" th:text="${article.getTitle()}"></h1>
        <div class="post-data">
            <time th:datetime="${#dates.format(article.getNewstime(),'yyyy/MM/dd HH:mm:ss')}" itemprop="datePublished" th:text="'发布于 '+ ${#dates.format(article.getNewstime(),'yyyy/MM/dd HH:mm:ss')}"></time>
        </div>
    </div>
    <div id="post-content" class="post-content" th:utext="${article.getContent()}"/></div>
<div id="vcomments"></div>
</article>
<script th:inline="javascript">
    $('#search-inp').keypress(function (e) {
        var key=e.which;
        if(key==13){
            var q=$(this).val();
            if(q && q!= ''){
                window.location.href = '/user/search/' + q;
            }
        }
    });
</script>
</body>
</html>